home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / p4 / p4-1_2c.lha / p4-1.2c / CHANGES next >
Text File  |  1993-05-24  |  4KB  |  89 lines

  1.  
  2.  
  3. 1)  All p4 options now start with "-p4":
  4.  
  5.         -p4help           get this message
  6.         -p4pg     <file>  set procgroup file
  7.         -p4dbg    <level> set debug level
  8.         -p4rdbg   <level> set remote debug level
  9.         -p4gm     <size>  set globmemsize
  10.         -p4dmn    <name>  set domainname
  11.         -p4out    <file>  set output file for master
  12.         -p4rout   <file>  set output file prefix for remote masters
  13.         -p4ssport <port>  set private port number for secure server
  14.         -p4log            enable internal p4 logging by alog
  15.         -p4version        print current p4 version number
  16.  
  17.  
  18. 2)  The major change to this version of p4 may require a small change
  19.     to user programs.  Because a number of users complained about the
  20.     necessity of having a slave procedure even when it was unused, we
  21.     have eliminated the requirement.  However, this caused us to
  22.     slightly alter the interface, and thus may require some users to
  23.     make small alterations to the start-up procedures in their
  24.     programs.  The change is explained in detail (by example) below.
  25.     For further examples, see the programs in the messages subdirectory,
  26.     e.g. sr_test.c (SPMD) and sr_master.c / sr_slave.c (non-SPMD).
  27.  
  28.  
  29.     For programs supporting the Single-Program-Multiple-Data (SPMD) 
  30.     model, i.e. programs in which all processes execute the same program:
  31.  
  32.     Old Version                         New Version
  33.     ------------------------------      ------------------------------
  34.  
  35.     #include "p4.h                      #include "p4.h"
  36.     
  37.     main(argc,argv)                     main(argc,argv)
  38.     int argc;                           int argc;
  39.     char **argv;                        char **argv;
  40.     {                                   {
  41.     p4_initenv(&argc,argv);             p4_initenv(&argc,argv);
  42.     if (p4_get_my_id() == 0)            p4_create_procgroup();
  43.     {                                   if (p4_get_my_id() == 0)
  44.         p4_create_procgroup();          {
  45.         master();                           master();
  46.     }                                   }
  47.     else                                else
  48.     {                                   {
  49.         slave();                            slave();
  50.         exit(0);                            exit(0);
  51.     }                                   }
  52.     p4_wait_for_end();                  p4_wait_for_end();
  53.     }                                    }
  54.  
  55.  
  56.     
  57.     Note that programs in which the master process executes one program
  58.     and the remote slave processes execute some other program, the code
  59.     for the master proces is essentially the same as that pictured
  60.     above, except that if the programmer knows that a local slave
  61.     process will never be "forked", then the call to slave can be
  62.     eliminated.  Also, in this model, the programmer used to code the
  63.     makefile such that the slave program would link with p4_cmain.
  64.     This is no longer supported because p4_cmain explicitly invoked a
  65.     procedure named "slave".  Instead, the user must now supply a small
  66.     main procedure to invoke the slave procedure (which no longer has
  67.     to be named slave).  An example main is given below (also, see
  68.     slave_main.c in the messages directory).
  69.  
  70.  
  71.     Separate Slave Main Procedure
  72.     ------------------------------
  73.     #include "p4.h"
  74.     #include "sr_user.h"
  75.  
  76.     main(argc, argv)
  77.     int argc;
  78.     char **argv;
  79.     {
  80.     p4_initenv(&argc, argv);
  81.     /*****
  82.         if (p4_am_i_cluster_master())
  83.         p4_dprintf("I am the cluster master\n");
  84.     *****/
  85.     slave();
  86.     p4_wait_for_end();
  87.     }
  88.  
  89.